package Demo1;

import Demo3.*;

import java.util.Scanner;

public class NormalUser extends Person{

    //构造方法
    public NormalUser(String name, int age) {
        super(name, age);
        this.iFuntions = new IFuntion[]{
                new Exit(),
                new Borrow(),
                new Return(),
                new Search(),
                new ShowBook()
        };
    }

    @Override
    public int  menu(){
        //打印菜单
        System.out.println(this.name + "欢迎你来到图书管理系统！");
        System.out.println("****************************");
        System.out.println("*****     0.Exit       *****");
        System.out.println("*****     1.Borrow    *****");
        System.out.println("*****     2.Return    *****");
        System.out.println("*****     3.Search     *****");
        System.out.println("*****     4.ShowBook   *****");
        System.out.println("****************************");
        //选择功能
        Scanner scanner = new Scanner(System.in);
        System.out.print("请选择：>");
        int choice = scanner.nextInt();
        //返回选择选项
        return choice;
    }
}
